package com.linko.intelligent.remote.core.timer;

import com.linko.intelligent.remote.core.service.CategoryRefreshService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @Author yuan
 * @create 2024/2/1 11:24
 */

@Service
public class CategoryRefreshTimer {

    @Autowired
    CategoryRefreshService categoryRefreshService;

    //每1分钟
    @Scheduled(cron = "${scheduler.cron.categoryRefresh}")
    public void exec() {
        System.out.println("刷新设备分类列表");
        categoryRefreshService.refresh();
    }
}
